/*
 * Fmp4MediaMuxer.h
 *
 *  Created on: 2021-08-02
 *      Author: chuanjiang.zh
 */

#ifndef FMP4MEDIAMUXER_H_
#define FMP4MEDIAMUXER_H_

#include "UMediaMuxer.h"

class Fmp4MediaMuxerPrivate;

class DLLEXPORT Fmp4MediaMuxer : public UMediaMuxer
{
public:
    Fmp4MediaMuxer();
    virtual ~Fmp4MediaMuxer();

	virtual bool open(const UMediaFormat& fmt);

	virtual void close();

	virtual bool isOpen();


	virtual bool getOutFormat(UMediaFormat& fmt);

	virtual bool input(UMediaPacket& pkt);

	virtual void setSink(Sink sink);

	virtual const char* getName();

	virtual void flush();

protected:
	void handlePacket(uint8_t* data, int size, int64_t pts, int flags);

private:
	Fmp4MediaMuxerPrivate*	m_pimp;
	UMediaFormat	m_format;

};

#endif /* FMP4MEDIAMUXER_H_ */
